﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RegularExpressions.cs" company="">
//   
// </copyright>
// <summary>
//   The regular expressions.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Core
{
    using System.Text.RegularExpressions;

    /// <summary>
    ///   The regular expressions.
    /// </summary>
    public static class RegularExpressions
    {
        #region Constants

        /// <summary>
        ///   The file path pattern.
        /// </summary>
        public const string FilePathPattern = @"^(?:[a-zA-Z]\:|\\\\[\w\.]+\\[\w.]+)\\(?:[\w]+\\)*\w([\w.])+$";

        /// <summary>
        ///   The uri pattern.
        /// </summary>
        public const string UriPattern = @"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?";

        #endregion

        #region Static Fields

        /// <summary>
        ///   The file path.
        /// </summary>
        public static readonly Regex FilePath = new Regex(FilePathPattern);

        /// <summary>
        ///   The uri.
        /// </summary>
        public static readonly Regex Uri = new Regex(UriPattern);

        #endregion
    }
}